[#include "../../common/html.ftl" /]
[@html]
    [@head title="流程办理" css=["fw"] /]
    [@body]
        [@formMain ]
            <div class="fw-forms">
                 [@dataForm formId="form-process-banli" ]
                    <input id="configId" type="hidden" name="configId" value="${config.configId}" />
                    <div class="am-form-group am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <label class="is-required">受理单号：</label>
                        <p>202409033002</p>
                    </div>
                    <div class="am-form-group am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <label class="is-required">当前任务：</label>
                        <p>审核</p>
                    </div>
                     <div class="am-form-group am-u-sm-12 am-u-md-12 am-u-lg-12">
                         <label>申请信息：</label>
                         <p>钱宝宝<span>09/03</span></p>
                         <p>现场数据库修改企业表信息</p>
                     </div>
                    <div class="am-form-group am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <label>申请内容：</label>
                        <p>
                            update base_enterprise_info set remark = '新增企业' where id = '234123123123';
                        </p>
                    </div>
                    <div class="am-form-group am-u-sm-12 am-u-md-6 am-u-lg-4">
                        <label class="is-required">审批结果：</label>
                        <p class="am-text-danger">不同意</p>
                    </div>
                     <div class="am-form-group am-u-sm-12 am-u-md-6 am-u-lg-4">
                         <label class="is-required">审批人：</label>
                         <p>王某</p>
                     </div>
                     <div class="am-form-group am-u-sm-12 am-u-md-6 am-u-lg-4">
                         <label class="is-required">审批日期：</label>
                         <p>2024-09-04 12:12:00</p>
                     </div>
                     <div class="am-form-group am-u-sm-12 am-u-md-12 am-u-lg-12">
                         <label>审批意见：</label>
                         <p>
                             该数据已处理，无需再处理。
                         </p>
                     </div>
                 [/@dataForm]
            </div>
        [/@formMain]

        [@rightToolbar /]

        [@script js=["fw", "validate"] progress="false" ]
            <script type="text/javascript">
                var prefix = ctx + "osfw/activiti/process";

                $("#form-process-banli").validate({
                    rules: {
                        configName: {
                            maxlength: 100,
                        },
                        configKey: {
                            maxlength: 100,
                            remote: {
                                url: prefix + "/checkConfigKeyUnique",
                                type: "post",
                                dataType: "json",
                                data: {
                                    "configId": function() {
                                        return $("#configId").val();
                                    },
                                    "configKey": function() {
                                        return $.common.trim($("input[name='configKey']").val());
                                    },
                                },
                            }
                        },
                        configValue: {
                            maxlength: 500
                        },
                        remark: {
                            maxlength: 500
                        }
                    },
                    messages: {
                        configKey: {
                            remote: "该参数键名已经存在"
                        }
                    },
                    onkeyup: false,
                    focusCleanup: true
                });

                function submitHandler() {
                    if ($.validate.form()) {
                        $.operate.save(prefix + "/edit", $('#form-process-banli').serialize());
                    }
                }
            </script>
        [/@script]
    [/@body]
[/@html]